package it.netsphere.nswing.util;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Window;

public class SwingUtils {

	public static void centerWindow(Window w) {
		Toolkit tk = Toolkit.getDefaultToolkit();
		Dimension screenSize = tk.getScreenSize();
		int screenHeight = screenSize.height;
		int screenWidth = screenSize.width;
		//w.setSize(screenWidth / 2, screenHeight / 2);
		w.setLocation(screenWidth / 4, screenHeight / 4);
	}
}
